/* 
 * File:   Label.h
 * Author: lgr013
 *
 * Created on 13 de octubre de 2014, 13:19
 */

#include <string>
#include <iostream>
#include "SDL2/SDL.h"
#include "SDL2/SDL_image.h"
#include "SDL2/SDL_ttf.h"

#ifndef LABEL_H
#define	LABEL_H

using namespace std;

class Label {
private:
  
    struct Style{
         char* pathToTTF; //tipografia
         int fontSize; //tamanio fuente
         SDL_Color textColor;
    };
    
    struct Style s;
    
    string labelText; //texto del label
    int tWidth; //ancho del label
    int tHeight; //alto del label
    
    TTF_Font* myFont; 
    SDL_Texture* tTexture;

public:
    Label();
    virtual ~Label();
    
    //setters
    void setLabelText (string etiqueta);
    void setLabelStyle (char* pathFuente, int size, SDL_Color color);
          
    //getters
    int getWidht ();
    int getHeight ();
    TTF_Font* getFontType();
    string getLabelText ();
    
    //funciones adicionales
    bool initLabelFont();
    bool createLabelTexture (SDL_Renderer** gRenderer);
    void renderLabel( SDL_Renderer** gRenderer, int x, int y, SDL_Rect* clip=NULL, double angle = 0.0, SDL_Point* center = NULL, SDL_RendererFlip flip = SDL_FLIP_NONE);
    bool handleEvent (SDL_Event* event);
    void printLabel(char* pathFuente, int size, SDL_Color color, SDL_Renderer** gRenderer, int x, int y, SDL_Rect* clip=NULL, double angle = 0.0, SDL_Point* center = NULL, SDL_RendererFlip flip = SDL_FLIP_NONE);
};

#endif	/* LABEL_H */

